﻿import QtQuick 2.0

Rectangle{
    id: dour
    property string text1:""
    property string text2:""
    property string upcolor:"white"
    property string downcolor:"white"
    property string t2color:"black"
    signal changePresetView()
    property string iconpath: ""

    Column{
        Rectangle{
            width: dour.width
            height: dour.height*7/19
            color: upcolor
            border.width: 1
            anchors.bottomMargin: 0
            border.color: "black"
            Text {
                id: t1
                text: text1
                anchors.centerIn: parent
                font.pixelSize: config.fontsize + 5*dp
            }
            Image {
                x:parent.width-25*dp
                y:parent.height/2-9*dp
                width: 18*dp
                height: 18*dp
                source: iconpath
            }

        }Rectangle{
            width: dour.width
            height: dour.height*7/12
            color: downcolor
            border.width: 1
            border.color: "black"
            Text {
                id: t2
                text: text2
                anchors.centerIn: parent
                font.pixelSize: config.fontsize + 6*dp
                color: t2color
            }
            MouseArea{
                anchors.fill:parent
                onReleased: {
                    changePresetView()
                }
            }
        }
    }
}
